﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace EIA.PM.DAL
{
    /// <summary>
    /// todo:线程安全
    /// </summary>
    /// <typeparam name="TModel"></typeparam>
    public interface IDao<TModel>
    {
        object Insert(TModel model);
        object Insert(IDictionary props);
        TModel Get(object id);
        IList<TModel> List(IDictionary props);
        int Count(IDictionary props);
        IList<TModel> List(IDictionary props, int pagesize, int page);
        bool Update(TModel model);
        bool Update(IDictionary props);
        int Delete(object id);
        int Delete(TModel model);
        int Delete(IDictionary props);
        int Clear();

        IDASession DASession { get; }
    }
}
